package edu.rmit.service;

import java.rmi.RemoteException;
import java.util.List;

import edu.rmit.domain.Message;

/**
 * This interface defines the message operation. Like add one message, delete
 * one message, and get one group's message.
 * 
 * @author Joey George
 * @version 1.0
 */
public interface IMessageService extends IServerService {
	/**
	 * This method defines to insert an message.
	 * 
	 * @param groupId
	 *            The group id which this message belongs to.
	 * @param content
	 *            The content of this message.
	 * @param userName
	 *            The user name who want to add a message.
	 */
	public void addMessage(int groupId, String content, String userName) throws RemoteException;

	/**
	 * This method defines to delete an message.
	 * 
	 * @param messageId
	 *            The message id which you want to delete.
	 */
	public void deleteMessage(int messageId) throws RemoteException;

	/**
	 * This method defines to get all the message which belongs to a particular
	 * group.
	 * 
	 * @param groupId
	 *            The group id which contains all the information.
	 * @return The messages which belongs to this group.
	 */
	public List<Message> getMessages(int groupId) throws RemoteException;
}
